<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('video', function (Blueprint $table) {
            $table->id();
            $table->string('title')->comment('视频标题');
            $table->string('content')->comment('视频内容');
            $table->string('image')->comment('视频封面图片');
            $table->integer('browse_num')->default(0)->comment('浏览次数');
            $table->integer('category_id')->default(0)->comment('分类ID');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('video');
    }
};
